package com.zhuiYun.project.api.commoditydetail.mapper;

import com.zhuiYun.project.api.commoditydetail.entity.CommoditySpec;
import com.zhuiYun.project.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @ClassName CommodityMapper
 * @Description TODO 商品规格dao层接口
 * @Author 赵笛
 * @Date 2023/4/4 16:02
 **/
@Mapper
public interface CommoditySpecMapper extends BaseMapper<CommoditySpec> {
    /**
     * @Author 赵笛
     * @Description TODO 根据商品id查询当前商品规格
     * @Date 2023/4/5 8:59
     * @Return com.zhuiYun.project.common.response.CommonResult
     * @param commodityId
     */
    @Select("select * from commodity_spec where commodity_id = #{commodityId} and delete_flag = 0")
    List<CommoditySpec> getCommoditySpecById(@Param("commodityId") Integer commodityId);
}
